import React from 'react';
import './App.css';
import { Layout } from 'antd';
import {NavLink,Switch,Route} from 'react-router-dom'
// import Route from './route'
import Org from './components/org/org.js'
import Custorm from './components/custorm/custorm'

const { Header, Footer } = Layout;
class App extends React.Component {
  render() {
    return <Layout className='box'>
      <Header className='header'>
        <span>CRM管理</span>
        <div>
          <NavLink to='/org'>组织结构</NavLink>
          <NavLink to='/custorm'>客户管理</NavLink>
        </div>
        <span>您好 xxx </span>
        <a href="#">安全退出</a>
      </Header>
      <Switch>
        <Route path='/org' component={Org}></Route>
        <Route path='/custorm' component={Custorm}></Route>
      </Switch>
      {/* <Layout className='content'>
        <Nav></Nav>
        <Content>
          <Switch>
            <Redirect path='/' exact to='/org'></Redirect>
            <Route path='/org/userlist' component={myloadable(()=>import('./components/org/user/list.js'))}></Route>
            <Route path='/org/adduser' component={myloadable(()=>import('./components/org/user/add.js'))}></Route>
          </Switch>
          
        </Content>
      </Layout> */}
      <Footer className='footer'>Footer</Footer>
    </Layout>
  }
}

export default App;
